package edu.wpi.cs509.ui.menu;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import edu.wpi.cs509.ui.A__MainStrategoClient;

/**
 * The action handler for the "Menu > Quit"
 * 
 * @author afoltan
 *
 */
public class MenuActionQuit implements ActionListener {

	// the stratego client instance
	A__MainStrategoClient a__MainStrategoClient;
	
	/**
	 * Constructor for the action listener
	 * @param a__MainStrategoClient
	 */
	public MenuActionQuit(A__MainStrategoClient a__MainStrategoClient) {
		this.a__MainStrategoClient = a__MainStrategoClient;
	}

	/**
	 * Handler for the action event
	 * @param e - the ActionEvent requesting the menuActionQuit 
	 */
	@Override
	public void actionPerformed(ActionEvent e) {
		//JMenuItem menuItem = (JMenuItem)(e.getSource());
		a__MainStrategoClient.quit();
	}

}
